

<a href="{:url('addmanjian')}" class="layui-btn">新建满减券</a>
<a href="{:url('addchekou')}" class="layui-btn">新建折扣券</a>


<table class="layui-table edit-table" lay-data="{cellMinWidth: 80,
    url:'{:url('getlist')}',page: true
    }" >
    <thead>
    <tr>
        <th lay-data="{field:'name',sort: true}">优惠卷名称</th>
        <th lay-data="{toolbar:'#type', sort: true}">发放类型</th>
        <th lay-data="{toolbar:'#ctype', sort: true}">优惠卷类型</th>
        <th lay-data="{toolbar:'#count'}">使用/领取/发放（数量）</th>
        <th lay-data="{toolbar:'#send_time'}">发放/结束时间</th>
        <th lay-data="{toolbar:'#use_time'}">使用/结束时间</th>
        <th lay-data="{toolbar: '#status'}">状态</th>
        <!--<th lay-data="{toolbar: '#manipulate', width:200}">操作</th>-->
    </tr>
    </thead>
</table>
<script type="text/html" id="manipulate">

    <a href="" class="layui-btn layui-btn-danger">修改</a>
</script>
<script type="text/html" id="ctype">

    {{#  if(d.coupon_type==0){ }}
    满减
    {{#  } else if(d.coupon_type==1) { }}
    折扣
    {{#  } }}
</script>
<script type="text/html" id="type" >
    {{#  if(d.type==0){ }}
    下单赠送
    {{#  } else if(d.type==1) { }}
    指定发放
    {{#  } else if(d.type==2) { }}
    免费领取
    {{#  } else if(d.type==3) { }}
    线下发放
    {{#  } }}
</script>
<script type="text/html" id="count">

    {{d.use_num}}/{{d.send_num}}/{{d.createnum}}
</script>
<script type="text/html" id="send_time">

    {{d.send_start_time}}
    <br>
    {{d.send_end_time}}
</script>
<script type="text/html" id="use_time">

    {{d.use_start_time}}
    <br>
    {{d.use_end_time}}
</script>

<script type="text/html" id="status">

    <input lay-filter="switchAjax" {{#  if(d.status==1){ }} checked="" {{#  } else { }} {{#  } }} data-url="{:url('fenlei')}?type=1&id={{d.id}}"  type="checkbox"  name="open" lay-skin="switch" lay-text="显示|隐藏">

</script>
<!---->